1. Field of the Invention
This invention relates to a power saving method of a computer system and particularly relates to a power saving method applied to a computer system in which resource allocation and release requests of a communication device are issued every start and termination of communication processing using the communication device, and a computer system in which a device driver corresponding to a PC card is loaded and unloaded respectively in response to mounting of the PC card and designation of stoppage of use of this PC card.
2. Description of the Related Art
Recently, various kinds of portable computers such as a portable computer, a PDA of a note book type or a subnote type, etc. have been developed. The computers of this kind are used under a mobile computing environment at many opportunities. Therefore, various kinds of power managing functions for reducing power consumption of the computers are set.
However, no sufficient power saving mechanism is arranged with respect to a communication device such as a modem and a peripheral device such as a PC card. Accordingly, there is a problem of uselessly consuming power.
In the following description, a case of use of a PC card modem is illustrated as an example and conventional power management with respect to this PC card modem will be explained.
As shown in FIG. 1, when it is detected (in step S101) that the PC card modem is inserted into a PC card socket of a portable computer, a power source with respect to the PC card modem is turned on so that an electric current flows into the PC card modem through the PC card socket. Next, loading and configuration setting processings (for example, memory locations, the I/O port address and the IREQ number that the PC card uses are set in the registers of the PCMCIA controller) of a device driver corresponding to this PC card modem are performed (in steps S102, S103) and the PC card modem is set to a usable state.
Thereafter, when a resource allocation of the modem is required via a communication control driver from an application program, etc., open processing (a method of resource management such as informing an OS of an application which the PC card is to be used) for allocating the PC card modem to a request source is performed (step S104). Thus, a resource of the PC card modem is acquired by the application program and communication processing using the PC card modem can be executed.
When the communication processing is terminated, a resource release request of the modem is issued via the communication control driver from the application program. Thus, close processing (a processing of returning a handler to the OS) for returning the PC card modem to a computer system is performed (step S105) and the communication processing using the PC card modem is terminated. Thereafter, when the resource allocation of the modem is again required via the communication control driver from the application program, etc., the above-mentioned open processing is performed (step S106). When the communication processing is then terminated, the above-mentioned close processing is performed (step S107).
When it is detected (in step S108) that the PC card modem is detached from the PC card socket, the power source with respect to the PC card modem is turned off.
Thus, the power source of the PC card modem is conventionally turned on continuously during a period from mounting of the PC card modem to the PC card socket to detachment of the PC card modem irrespective of execution of the communication processing using the PC card modem. Accordingly, a useless electric current also flows through the PC card modem for a period in which no PC card modem is used, thereby increasing power consumption.
Power can be saved if a user inserts the card into the card socket only when the user himself uses the PC card modem, and the user pulls the card out of the card socket immediately when the use of the PC card is terminated. However, in reality, it is difficult for the user to compulsorily insert and pull such a card.
Recently, a system for saving a memory has been also developed. In a construction of this system, when the user explicitly designates stoppage of the use of the PC card (for example, the cease of the use of the PC card is selected by clicking an icon indicating the PC card), a device driver corresponding to this PC card is unloaded from the memory.
However, in such a system, a power source of the PC card is also continuously turned on during a period from the mounting of the PC card to the PC card socket to the detachment of the PC card.
Namely, as shown in FIG. 2, when it is detected (in step S201) that the PC card is inserted into the PC card socket of a portable computer, the power source with respect to the PC card is turned on so that an electric current flows into the PC card through the PC card socket. Next, a device driver corresponding to this PC card is loaded and configuration setting processing of the device driver is performed (in steps S202, S203) so that the PC card is set to a usable state. Thereafter, the card is accessed in accordance with an access request from an application program, etc. (step S204). When it is detected that a user explicitly designates stoppage of the use of the PC card, a device driver corresponding to this PC card is unloaded (in steps S205, S206). Then, when it is detected (in step S207) that the PC card is detached from the PC card socket, the power source with respect to this PC card is turned off.
Thus, power is continuously supplied to the PC card as long as the PC card is mounted to the PC card socket. Accordingly, after the use of the PC card is stopped, power is uselessly consumed continuously.
As mentioned above, there is conventionally a problem of uselessly consuming power since no sufficient power saving mechanism is arranged with respect to a communication device such as a modem, etc., and a peripheral device such as a PC card.